<?php

use common\server\BasicDataServer;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model common\models\RentingModel */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="house-model-form">

    <?php $form = ActiveForm::begin(); ?>

    <div class="row">
        <div class="col-lg-6">
        	<?= $form->field($model, 'id')->textInput(['type'=>'hidden'])->label(false);?>
            <?= $form->field($model, 'bname')->textInput(['maxlength' => true]) ?>
			
			<?php
	            if($error != 'ok'){
					echo "<p style='color:red;'>{$error}</p>";
	            }			
            ?>

            <?= $form->field($model, 'title')->textInput() ?>
   			<?= $form->field($model, 'brandloge')->fileInput() ?>
			
            <?php
            if(!empty($model->brandloge)){
                echo "<img src='{$model->brandloge}' style='max-height: 200px; max-width: 200px'/><br/><br/>";
            }			
            ?>
            
        </div>
    </div>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '添加' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
